package com.lingyu.jsjx.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.common.datascope.annotation.DataScope;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lingyu.jsjx.mapper.StudentEducationMapper;
import com.lingyu.jsjx.domain.StudentEducation;
import com.lingyu.jsjx.service.IStudentEducationService;

/**
 * 学生培养Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-08
 */
@Service
public class StudentEducationServiceImpl  extends ServiceImpl<StudentEducationMapper, StudentEducation> implements IStudentEducationService
{
    @Autowired
    private StudentEducationMapper studentEducationMapper;

    /**
     * 查询学生培养
     * 
     * @param studentId 学生培养主键
     * @return 学生培养
     */
    @Override
    public StudentEducation selectStudentEducationByStudentId(Long studentId)
    {
        return studentEducationMapper.selectStudentEducationByStudentId(studentId);
    }

    /**
     * 查询学生培养列表
     * 
     * @param studentEducation 学生培养
     * @return 学生培养
     */
    @Override
    @DataScope(deptAlias = "u", userAlias = "se",type = "jsjx")
    public List<StudentEducation> selectStudentEducationList(StudentEducation studentEducation)
    {
        return studentEducationMapper.selectStudentEducationList(studentEducation);
    }

    /**
     * 新增学生培养
     * 
     * @param studentEducation 学生培养
     * @return 结果
     */
    @Override
    public int insertStudentEducation(StudentEducation studentEducation)
    {
        return baseMapper.insert(studentEducation);
    }

    /**
     * 修改学生培养
     * 
     * @param studentEducation 学生培养
     * @return 结果
     */
    @Override
    public int updateStudentEducation(StudentEducation studentEducation)
    {

        return baseMapper.updateById(studentEducation);
    }

    /**
     * 批量删除学生培养
     * 
     * @param studentIds 需要删除的学生培养主键
     * @return 结果
     */
    @Override
    public int deleteStudentEducationByStudentIds(Long[] studentIds)
    {
        return studentEducationMapper.deleteStudentEducationByStudentIds(studentIds);
    }

    /**
     * 删除学生培养信息
     * 
     * @param studentId 学生培养主键
     * @return 结果
     */
    @Override
    public int deleteStudentEducationByStudentId(Long studentId)
    {
        return baseMapper.deleteById(studentId);
    }
}
